from gravityassist.config import get_option, get_options

def set_assistant_model(model: str):
    available_models = get_option('available_models')
    if model not in available_models:
        return {'success': False, 'message': 'Invalid model. Available models are: ' + ''.join(available_models.keys())}
    model = available_models[model]
    get_options()["model"] = model
    return {'success': True, 'message': 'Assistant model set to ' + model}
